package com.sicau.socialpracticesystem.entity.param.pointsitem;

import com.alibaba.excel.annotation.ExcelProperty;
import com.alibaba.excel.annotation.format.DateTimeFormat;
import com.sicau.socialpracticesystem.config.convert.LocalDateTime2DateConverter;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import javax.validation.constraints.DecimalMin;
import javax.validation.constraints.NotEmpty;
import javax.validation.constraints.NotNull;
import javax.validation.constraints.Size;
import java.time.LocalDateTime;

/**
 * @author ttxxi
 * @description:  积分上传对象模型
 * @create: 2021-04-28
 **/
@Data
@ApiModel(description = "积分上传对象模型")
public class PointsItemUploadData {

    @NotEmpty(message = "不能为空")
    @Size(max = 80, message = "长度必须小于{max}")
    @ExcelProperty("项目题目")
    @ApiModelProperty(value = "活动名称 | 项目题目")
    private String activityName;

    @DateTimeFormat("yyyy-MM-dd")
    @ExcelProperty(value = "获得日期", converter = LocalDateTime2DateConverter.class)
    @ApiModelProperty(value = "创建时间 | 获得日期")
    private LocalDateTime createdTime;

    @NotNull(message = "不能为空")
    @DecimalMin(value = "0.0", message = "分值不得低于{min}")
    @ExcelProperty("分值")
    @ApiModelProperty(value = "二课分值 | 分值")
    private Double secondLessonValue;

    @NotNull(message = "不能为空")
    @ExcelProperty("学号")
    @ApiModelProperty(value = "用户学工号 | 学号")
    private Integer userNumber;

}
